From d5e773e2cc963d7c1307aa1ac52a4bc772e9f27d Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc" Date: Sun, 5 Jan 2020 02:09:08 -0600 Subject: [PATCH] Allow marking and running of just unit or just integration tests --- Makefile | 2 ++ Makefile_pgwui.mk | 17 ++++++++++++++++- tox.ini | 5 ++++- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 7f1ab70..b9337db 100644 --- a/Makefile +++ b/Makefile @@ -45,3 +45,5 @@ rm_coverage_data: rm -f $(COVERAGE_DATA) check: rm_coverage_data +check-unit: rm_coverage_data +check-integration: rm_coverage_data diff --git a/Makefile_pgwui.mk b/Makefile_pgwui.mk index 6e78bcd..fd0b3e5 100644 --- a/Makefile_pgwui.mk +++ b/Makefile_pgwui.mk @@ -117,13 +117,28 @@ upload: .PHONY: push git push -## check Quick run of regression tests, +## check Quick run of all regression tests, ## only with the default python .PHONY: check check: devel/pytest devel/pytest/bin/flake8 . devel/pytest/bin/py.test --cov=pgwui_${PGWUI_NAME} tests +## check-unit Quick run of unit regression tests, +## only with the default python +.PHONY: check-unit +check-unit: devel/pytest + devel/pytest/bin/flake8 . + devel/pytest/bin/py.test -m unittest --cov=pgwui_${PGWUI_NAME} tests + +## check-integration Quick run of integration regression tests, +## only with the default python +.PHONY: check-integration +check-integration: devel/pytest + devel/pytest/bin/flake8 . + devel/pytest/bin/py.test -m integrationtest \ + --cov=pgwui_${PGWUI_NAME} tests + ## pudb Run the python pudb debugger .PHONY: pudb pudb: devel/pudb diff --git a/tox.ini b/tox.ini index 6b4945a..d969de8 100644 --- a/tox.ini +++ b/tox.ini @@ -43,4 +43,7 @@ select = E,W,F ignore = W503 [tool:pytest] -addopts = --cov --cov-append \ No newline at end of file +addopts = --cov --cov-append +markers = + unittest + integrationtest -- 2.34.1